Work around access to global resources without calling gtk_init()
authorTristan Van Berkom <tristanvb@openismus.com>
Sun, 24 Mar 2013 08:16:20 +0000 (17:16 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Mon, 8 Apr 2013 12:19:27 +0000 (21:19 +0900)
commit4ec6d6006e36f3f51074750534a8ab20b51abb5b
treea8d778d3a7ec2024000b4b251a81ccb8a355a4fb
parentc6ab5157358bc364eede018acc14de976add195c
Work around access to global resources without calling gtk_init()

Some utilities such as GIR and gtk-doc, initialize class vtables without
initializing GTK+, with composite templates accessing resources this
causes a hand full of unneeded warnings.

The workaround for now is the use a private function _gtk_ensure_resources()
which is both called while initializing GTK+, and at the beginning of
gtk_widget_class_set_template_from_resource() (the private function
ensures that the resource will only ever be registered GOnce).
gtk/gtkmain.c
gtk/gtkprivate.c
gtk/gtkprivate.h
gtk/tests/Makefile.am